#include <algorithm>
#include <cstdlib>
#include <iostream>
using namespace std;
 
int main()
{
	int n = 0;
	cin >> n;
	string tmp;
	while (n)
	{
		int val = n % 10;
		if (val % 2 == 0)
			tmp += "0";
		else
			tmp += "1";
		n /= 10;
	}
	reverse(tmp.begin(), tmp.end());
	int res = atoi(tmp.c_str());
	cout << res;
	return 0;
}